import java.nio.ByteBuffer;

public class ByteBufferDemo {
	public static void main(String[] args) {
		ByteBuffer buffer = ByteBuffer.allocate(10);
		buffer = ByteBuffer.wrap("1234567890".getBytes());
		System.out.println("start>>>buffer:"+new String(buffer.array()));
		byte[] bs=new byte[10];
		buffer.get(bs);
		System.out.println("bs:"+new String(bs));
		System.out.println("end>>>buffer:"+new String(buffer.array()));
	}
}
